import Vue from 'vue'
import App from './App.vue'
import router from './router'
import axios from './util/axios'
import store from './store'
import Storage from 'vue-ls'
import config from '@/config/defaultSettings'
//normalize.css
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
//element-ui
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
//global css
import '@/assets/styles/index.scss'
//icon
import '@/icons'

//moment
import './util/dateTimeFormatUtils.js'
//mavonEditor markdown编辑器组件
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
//v-viewer
import 'viewerjs/dist/viewer.css'
import Viewer from 'v-viewer'
// directive
import './util/directive'
import echarts from 'echarts'

Vue.prototype.$echarts = echarts
Vue.use(Storage, config.storageOptions)

Vue.use(mavonEditor)
Vue.use(Element)
Vue.use(Viewer)

Vue.prototype.msgSuccess = function (msg) {
  this.$message.success(msg)
}

Vue.prototype.msgError = function (msg) {
  this.$message.error(msg)
}
Vue.prototype.$store = store
Vue.config.productionTip = false

window.vm = new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')